Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark disk wwn and nvram arguments as computed #1064

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

wfdewith
Copy link
Contributor

@wfdewith wfdewith commented Jan 6, 2024

These changes are meant to keep the libvirt provider idempotent, i.e. running terraform apply twice with no changes in between should not result in any updated resources.

The disk WWN is randomly generated if it is not specified, which means that the disk.wwn argument will always be different when it is regenerated. This difference causes Terraform to perform an in-place update.

When specifying the firmware argument, libvirt will automatically generate the corresponding NVRAM definitions. Since the generated definitions differ from the unspecified nvram argument in the resource and the nvram argument is marked as force new, Terraform will replace the entire libvirt domain.

The nvram.file argument was required, but this is not necessary for libvirt. Libvirt will autogenerate the location of the NVRAM variables file even if only the template is specified.

These changes are meant to keep the libvirt provider idempotent, i.e.
running terraform apply twice with no changes in between should not
result in any updated resources.

The disk WWN is randomly generated if it is not specified, which means
that the disk.wwn argument will always be different when it is
regenerated. This difference causes Terraform to perform an in-place
update.

When specifying the firmware argument, libvirt will automatically
generate the corresponding NVRAM definitions. Since the generated
definitions differ from the unspecified nvram argument in the resource
and the nvram argument is marked as force new, Terraform will replace
the entire libvirt domain.

The nvram.file argument was required, but this is not necessary for
libvirt. Libvirt will autogenerate the location of the NVRAM variables
file even if only the template is specified.
@dmacvicar dmacvicar merged commit d07e296 into dmacvicar:main Mar 19, 2024
@dmacvicar
Copy link
Owner

Thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants